﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace QuanLyThuNgan
{
    public class LoaiDichVuDAO
    {
        public bool m_Insert(LoaiDichVuDTO _info)
        {
            string _sql = string.Format("usp_ThuNgan_LoaiDichVu_Insert '{0}',N'{1}','{2}',{3},N'{4}'", _info.Sloaidvu, _info.Stenloai, _info.Smadv, _info.Bguidi, _info.STenLoaiDVu);
            return Uit.it_SQL.ExecuteNonQuery(_sql, false);
        }

        public bool m_Update(LoaiDichVuDTO _info)
        {
            string _sql = string.Format("usp_ThuNgan_LoaiDichVu_Update '{0}',N'{1}','{2}',{3},N'{4}'", _info.Sloaidvu, _info.Stenloai, _info.Smadv, _info.Bguidi, _info.STenLoaiDVu);
            return Uit.it_SQL.ExecuteNonQuery(_sql, false);
        }

        public bool m_Delete(LoaiDichVuDTO _info)
        {
            string _sql = string.Format("usp_ThuNgan_LoaiDichVu_Delete {0}", _info.Sloaidvu);
            return Uit.it_SQL.ExecuteNonQuery(_sql, false);
        }

        public DataTable m_SelectAllLoaiDichVu()
        {
            string _sql = string.Format("usp_ThuNgan_LoaiDichVu_SelectAll ");
            return Uit.it_SQL.getDataTable(_sql, null, "");
        }
    }
}
